//package com.yiwei.zhh.impl;
//
//import android.content.Context;
//
//import com.yiwei.zhh.constant.Const;
//import com.yiwei.zhh.http.CallBackListener;
//import com.yiwei.zhh.http.InterfaceServer;
//import com.yiwei.zhh.http.InfoCallBack;
//import com.yiwei.zhh.interfaces.RegisterInfo;
//import com.yiwei.zhh.http.ResponseListener;
//import com.yiwei.zhh.model.LoginAndRegisterModel;
//import com.yiwei.zhh.model.RequestModel;
//import com.yiwei.zhh.model.ResponseModel;
//import com.yiwei.zhh.util.JsonUtil;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * 获取注册数据
// * Created by Master.Dong on 2016/4/13.
// */
//public class RegisterInfoImpl implements RegisterInfo {
//
//    /**
//     * 获取注册信息
//     *
//     * @param mContext
//     * @param callBack
//     */
//    @Override
//    public void getRegisterInfo(Context mContext, String account, String verifyCode, String password, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("account", account);
//        mapData.put("verify_code", verifyCode);
//        mapData.put("password", password);
//        RequestModel model = new RequestModel(mapData);
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.REGISTER, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT, new CallBackListener<LoginAndRegisterModel>(LoginAndRegisterModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<LoginAndRegisterModel>fromJson(content, LoginAndRegisterModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                LoginAndRegisterModel model = (LoginAndRegisterModel) result;
////
////                try {
////                    if (model.getStatus() == 0) {
////                        //访问接口失败,此处ignore
////                        callBack.onFailure(model.getMsg());
////                    } else {
////                        callBack.onSuccess(model);
////                        //返回数据接口
////                    }
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//
//    /**
//     * 获取注册验证码
//     *
//     * @param mContext
//     * @param callBack
//     */
//    @Override
//    public void getCode(Context mContext, String type, String mobile, final InfoCallBack callBack) {
//        Map<String, Object> mapData = new HashMap<String, Object>();
//        mapData.put("type", type);
//        mapData.put("mobile", mobile);
//        RequestModel model = new RequestModel(mapData);
//        InterfaceServer.getInstance(mContext.getApplicationContext()).requestInterface(Const.REGISTER_CODE, Const.RequestMethod.POST, model,Const.DEFAULT_TIMEOUT,new CallBackListener<ResponseModel>(ResponseModel.class,callBack));
////                new ResponseListener() {
////            @Override
////            public void onStartInMainThread(Object result) {
////                callBack.onFailure(result.toString());
////            }
////
////            @Override
////            public void onFinishInMainThread(Object result) {
////            }
////
////            @Override
////            public Object onSuccessInRequestThread(int statusCode, String content) {
////                try {
////                    return JsonUtil.<ResponseModel>fromJson(content, ResponseModel.class);
////                } catch (Exception e) {
////                    return null;
////                }
////            }
////
////            @Override
////            public void onSuccessInMainThread(int statusCode, String content, Object result) {
////                ResponseModel model = (ResponseModel) result;
////
////                try {
////                    if (model.getStatus() == 1) {
////                        callBack.onSuccess(model.getMsg());
////                        //返回数据接口
////                    } else {
////                        //访问接口失败,此处ignore
////                        callBack.onFailure(model.getMsg());
////                    }
////                } catch (Exception e) {
////                    e.printStackTrace();
////                }
////            }
////        });
//    }
//}
